package Group9.TodoManager.Controller;

import Group9.TodoManager.Settings;
import Group9.TodoManager.Data.Task;

/**
 * StatusUpdater class is used to update the repository when status of 
 * a task changes.
 * @author volkan cambazoglu
 *
 */
public class StatusUpdater {

	/**
	 * Update repository
	 * @param task the task that status is changed
	 */
	public static void updateRepo(Task task){
		Settings.getRepository().removeItem(task);
		Settings.getRepository().Commit();
		Settings.getRepository().addNewItem(task);
		Settings.getRepository().Commit();
	}
}
